package com.fare.taluo.application.queue;

import java.util.List;

import com.fare.taluo.vo.queue.QueueBaseVO;

public interface IScheduleQueueApplication<X extends QueueBaseVO> {
	/**
	 * 获得计划内任务
	 * @param maxSize 一次获得的最大数量
	 * @return
	 */
	List<X> getPlanTask(int maxSize) throws Exception;
	/**
	 * 加载
	 * @param id
	 * @return
	 */
	public boolean load(Long id) throws Exception;
	/**
	 * 执行
	 * @param id
	 * @return
	 */
	public boolean execute(Long id) throws Exception;
	/**
	 * 归档
	 * @param id
	 * @return
	 */
	public boolean archive(X vo) throws Exception;
	/**
	 * 创建下一周期任务
	 * @param id
	 * @return
	 */
	public boolean createNext(Long id) throws Exception;
	/**
	 * 任务重置
	 * @return
	 */
	public boolean reset() throws Exception;
}
